<!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>搜索用户</title>
		<style>
			*{
				padding:0px;
				margin:0px;
			}
			a{
				text-decoration:none;
			}
			body{
				background:url("__PUBLIC__/Admin/Images/w70.png") repeat;
			}
			table{
				border-collapse:collapse;
			}
			tr{
				height:40px;
				border-top:2px solid #f9f0e1;
			}
			tr:hover{
				background:#f9f0e1;
			}
			.num{
				width:10px;
				font-size:20px;
				margin-left:8px;
				margin-right:5px;
			}
			.current{
				font-size:25px;
				font-weight:bold;
				color:#deae6e;
			}
			th{
				color:#d39c59;
			}
		</style>
		<script type="text/javascript" src="__PUBLIC__/Admin/Js/jquery.js"></script>
	</head>
	<body id="page_box">
		<center style="height:40px;line-height:40px;"><b style="font-size:30px;color:#d39c59;">搜索用户</b></center>
		<center>
			<table width="1100">
				<tr>
					<th></th>
					<th>用户ID</th>
					<th>用户名</th>
					<th>用户昵称</th>
					<th>用户头像</th>
					<th>用户生日</th>
					<th>真实姓名</th>
					<th>用户等级</th>
					<th>积分等级</th>
					<th>注册时间</th>
					<th>操作</th>
				</tr>
				<form action="__CONTROLLER__/delusers" method="post">
					<foreach name="user" item="us">
						<tr>
							<td align="center" width="20"><input type="checkbox" name="sel[]" class="selectors" value="{$us.id}"></td>
							<td align="center">{$us.id}</td>
							<td>{$us.username}</td>
							<td>{$us.nickname}</td>
							<td align="center">
								<img src="__PUBLIC__/Common/Uploads/Headpic/{$us.photoname}" alt="没有头像" width="70" height="30" />
							</td>
							<td align="center">{$us.birthday}</td>
							<td align="center">{$us.realname}</td>
							<td align="center">{$us.userrank}</td>
							<td align="center">{$us.pointsrank}</td>
							<td align="center">{$us.regtime}</td>
							<td align="center" width="80" style="font-size:13px;"><a href="__CONTROLLER__/mod/id/{$us.id}">修改</a>|<a href="__CONTROLLER__/del/id/{$us.id}">删除</a></td>
						</tr>
					</foreach>
					<tr>
						<td colspan="9">
							<input type="button" value="全选" onclick="sel(1)">
							<input type="button" value="反选" onclick="sel(2)">
							<input type="button" value="全不选" onclick="sel(3)">
							<input type="submit" value="批量删除">
				</form>
						<!-- 搜索框 -->
						<form action="__CONTROLLER__/searchuser" method="post" style="width:430px;float:right;">
							<span>
								<input type="search" name="keywords" style="width:230px;height:22px;margin-right:0px;" />
								<input type="submit" value="搜索" style="height:22px;width:60px;margin-left:0px;background:#d7a769;border:1px solid #a9a9a9;cursor:pointer;margin-left:-8px;font-weight:bold;" />
							</span>
						</form>
					</td>
					<td colspan="2" align="center">
						{$page}
					</td>
				</tr>
			</table>
		</center>
	</body>
	<script type="text/javascript">
		var inp = document.getElementsByClassName("selectors");

		function sel(args) {
			var len = inp.length;

			//当args =1时;设为全选状态
			if (args == 1) {
				for (var i = 0; i < len; i++) {
					inp[i].checked = true;
				}
			}

			//当args = 2时,设为反选状态
			if (args == 2) {
				for (var i = 0; i < len; i++) {
				inp[i].checked = !inp[i].checked;
				}
			}

			//当args = 3时,设为全不选状态
			if (args == 3) {
				for (var i = 0; i < len; i++) {
					inp[i].checked = false;
				}
			}
		}

		//分页ajax请求刷新页面
		function setPage(url) {
			$.get(url,function(data) {
				$("#page_box").html(data);
			})
		}
	</script>
</html>